//
//  UIView+GBExtent.h
//  DrawingTest
//
//  Created by chenguibang on 16/4/1.
//  Copyright © 2016年 chenguibang. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum : NSUInteger {
    CornerTypeTopLeft       = 1 << 1,
    CornerTypeTopRight      = 1 << 2,
    CornerTypeBottomLeft    = 1 << 3,
    CornerTypeButtomRight   = 1 << 4,
    CornerTypeAll  = ~0UL,
} CornerType;


typedef enum : NSUInteger {
    BorderTop      = 1 << 1,
    BorderRight      = 1 << 2,
    BorderLeft    = 1 << 3,
    BorderButtom   = 1 << 4,
    BorderAll  = ~0UL,
} BorderType;


typedef enum : NSUInteger {
    DashTop      = 1 << 1,
    DashRight      = 1 << 2,
    DashLeft    = 1 << 3,
    DashButtom   = 1 << 4,
    DashAll  = ~0UL,
} DashType;

@interface UIView(GBExtent)

/**
 *  添加圆角
 *
 *  @param type   圆角类型
 *  @param color  圆角颜色
 *  @param radius 圆角半径
 */
-(void)addCornerWithType:(CornerType)type color:(UIColor*)color radius:(CGFloat)radius;


/**
 *  添加边线
 *
 *  @param type  边线类型
 *  @param color 边线颜色
 *  @param width 边线款的
 */
-(void)addBorderWithType:(BorderType)type
                   color:(UIColor*)color
                   width:(CGFloat)width
;
/**
 *  添加虚线边框
 *
 *  @param type   虚线边框类型
 *  @param color  颜色
 *  @param width  虚线宽度
 *  @param lenght 短虚线的唱的
 *  @param space  短虚线的间距
 */
-(void)addDashWithType:(DashType)type
                 color:(UIColor*)color
                 width:(CGFloat)width
            itemlenght:(int)lenght
               spacing:(int)space;
@end
